package com.example.mptnet.Models;

import com.google.gson.annotations.SerializedName;

public class RP {
    @SerializedName("weekday")

    public String weekday;

    @SerializedName("first")
    public Item first;
    @SerializedName("second")
    public Item second;
    @SerializedName("third")
    public Item third;
    @SerializedName("fourth")
    public Item fourth;
    @SerializedName("fifth")
    public Item fifth;
    @SerializedName("sixth")
    public Item sixth;

    public RP(String weekday, Item first, Item second, Item third, Item fourth, Item fifth, Item sixth) {
        this.weekday = weekday;
        this.first = first;
        this.second = second;
        this.third = third;
        this.fourth = fourth;
        this.fifth = fifth;
        this.sixth = sixth;
    }
    public String get_rp(){
        String result = "";
        result += get_string_item(first);
        result += get_string_item(second);
        result += get_string_item(third);
        result += get_string_item(fourth);
        result += get_string_item(fifth);
        result += get_string_item(sixth);
        return result;
    }
    private String get_string_item(Item item){
        if (item != null)
            return item.lesson_title.equals("") ?"" :(item.lesson_number+".   "+item.lesson_title+"\n"+item.lesson_teacher)+"\n\n";
        else return "";
    }
    public String getWeekday() {
        return weekday;
    }

    public void setWeekday(String weekday) {
        this.weekday = weekday;
    }

    public Item getFirst() {
        return first;
    }

    public void setFirst(Item first) {
        this.first = first;
    }

    public Item getSecond() {
        return second;
    }

    public void setSecond(Item second) {
        this.second = second;
    }

    public Item getThird() {
        return third;
    }

    public void setThird(Item third) {
        this.third = third;
    }

    public Item getFourth() {
        return fourth;
    }

    public void setFourth(Item fourth) {
        this.fourth = fourth;
    }

    public Item getFifth() {
        return fifth;
    }

    public void setFifth(Item fifth) {
        this.fifth = fifth;
    }

    public Item getSixth() {
        return sixth;
    }

    public void setSixth(Item sixth) {
        this.sixth = sixth;
    }
}
